package homeword;

import java.util.Scanner;

public class 数字加密 {
    public static void main(String[] args) {
        //输入5位数密码
        int[] password = new int[5];
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的五位数密码,我们将会加密");
        for (int i = 0; i < password.length; i++) {
            password[i] = scanner.nextInt();
        }
        //将每一个密码进行对10求余数
        for (int i = 0; i < password.length; i++) {
            password[i] = password[i] % 10 + 5;
        }
        //密码反转
        for (int l = 0, r = password.length - 1; l < r; l++, r--) {
            int temp = password[l];
            password[l] = password[r];
            password[r] = temp;
        }
        //数字拼接
        int number = 0;
        for (int i = 0; i < password.length; i++) {
            number = number * 10 + password[i];
        }
        //打印加密后的密码
        System.out.println(number + " ");


    }
}
